
import type {App} from 'vue';
import type {RouteRecordRaw} from 'vue-router';

import { createRouter, createWebHashHistory } from 'vue-router';
import { basicRoutes, LoginRoute } from './routes';

// app router
export const router = createRouter({
  history: createWebHashHistory(process.env.VUE_APP_BASE_URL),
  routes: basicRoutes as unknown as RouteRecordRaw[],
  strict: true,
  scrollBehavior: () => ({ left: 0, top: 0 }),
});


// config router
export function setupRouter(app:App<Element>) {
  app.use(router);
}
